<script setup lang="ts">
import { Login } from '@/api/user'

Login({ username: 'admin', password: '111111' }).then((res) => {
  console.log('toeknset', res)
  if (res.code == 200) {
    //将token存储到本地缓存中
    localStorage.setItem('userToken', res.data.token)
  }
  console.log('成功！')
})
</script>

<template>
  <el-button>
    <i-ep-chatRound color="red" />
    2121
  </el-button>
  <div class="box">
    <div class="title">我是title</div>
  </div>
</template>

<style scoped lang="scss">
.box {
  width: 200px;
  height: 200px;
  background-color: $pink;
  color: aliceblue;
  .title {
    width: 100px;
    height: 100px;
    background-color: blue;
  }
}
</style>
